<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
		xmlns:h="http://java.sun.com/jsf/html"  
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:c="http://java.sun.com/jsp/jstl/core"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich"> 
    <h:head>
		<!-- 
			Ce fichier défini le header HTML à utiliser pour toutes les pages du site.
			Il doit s'occuper de charger l'intégralité des fichiers CSS et JavaScript à utiliser.
			Il doit également créer les variables globales javascript qui nécessitent des informations serveur. (Celles impossible à créer dans les .js)
		-->
		<!-- Balises META -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="fr" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />    
		
		<!-- Chargement du CSS -->
		<h:outputStylesheet library="#{userSession.theme}" name="css/bootstrap-responsive.min.css" />
		<h:outputStylesheet library="#{userSession.theme}" name="css/validationEngine.jquery.css" />
		<h:outputStylesheet library="#{userSession.theme}" name="css/global.css" />
		
		<!-- Chargement du JavaScript -->
		<h:outputScript library="#{userSession.theme}" name="js/jquery.min.js" />
		<h:outputScript library="#{userSession.theme}" name="js/jquery-ui.custom.min.js" />
		<h:outputScript library="#{userSession.theme}" name="js/jquery.validationEngine.js" />
		<h:outputScript library="#{userSession.theme}" name="js/jquery.validationEngine.js" />
		<h:outputScript library="#{userSession.theme}" name="js/jquery.validationEngine-#{webSiteConfig.lang}.js" />
		<h:outputScript library="#{userSession.theme}" name="js/bootstrap.min.js" />
		<h:outputScript library="#{userSession.theme}" name="js/bootstrap-datepicker.js" />
		<h:outputScript library="#{userSession.theme}" name="js/date.js" />
		
		<!-- Création des variables globales JavaScript. -->
		<script type="text/javascript">
			var config = new Object();
			
			config.baseUrl = "#{webSiteConfig.baseUrl}";
			config.pathUrl = "#{webSiteConfig.pathUrl}";
			config.environment = "#{webSiteConfig.environment}";
			config.theme = "#{userSession.theme}";
			config.langShort = "#{webSiteConfig.lang}";
			config.login = "#{userSession.login}";

			config.alert = new Object();
			config.alert.error = "#{htmlConfig.getAlert("error")}";
			config.alert.block = "#{htmlConfig.getAlert("block")}";
			config.alert.info = "#{htmlConfig.getAlert("info")}";
			config.alert.success = "#{htmlConfig.getAlert("success")}";

		</script>
		
		<!-- Chargement de notre script à nous, nécessitant que les variables globales soient initialisées. -->
		<h:outputScript library="#{userSession.theme}" name="js/global.js" />
    </h:head>  
</html>

